{{useCss "/app-pages/css/user/collection.scss"}}
<div class="collection">
    <div class="nav">
        <href to="/user/collection.html">
            <div class="nav-li">收藏店铺</div>
        </href>
        <div class="nav-li focus">收藏商品</div>
    </div>

    <hr />

    <div class="collection-box">
        {{#each $Cache.user.collection.collect_goods_detail}}
        <collectiongoods href="{{url}}" src="{{preview_img_url}}?imageView/1/w/200/h/200" goodsname="{{goods_name}}" price="{{price}}"></collectiongoods>
        {{/each}}
    </div>
</div>
<xmp type="tag" name="collectiongoods">
    <div class="goodsitem">
        <div class="imgbox">
            <a href="${href}" target="_blank">
                <img class="goodsimg" src="${src}" />
            </a>
        </div>
        <div class="infobox">
            <div class="item"><a target="_blank" href="${href}" class="goodsname">${goodsname}</a>
            </div>
            <div class="item">￥${price}</div>
            <div class="item">
                <button event-click="{{'$Top.$Event.user.collection.collect_goods_add_to_cart'}}">添加到购物车</button>
                <button event-click="{{'$Top.$Event.collection.remove_goods_from_collect'}}">移除</button>
            </div>
        </div>
    </div>
</xmp>
